package cn.school.iot.param;

import cn.school.common.utils.SysUserUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description: TODO(一句话描述该类的功能)
 * @ClassName: StudentRuleParam
 * @Author: tzw
 * @Date: 2024/4/11 14:58
 */
@Data
public class StudentRulePageParam {

    @ApiModelProperty(value = "名字")
    private String name;

    //页码
    @ApiModelProperty(value = "页码")
    private Integer pageNum;

    //每页大小
    @ApiModelProperty(value = "每页大小")
    private Integer pageSize;

    //班级Id
    @ApiModelProperty(value = "班级Id")
    private String classId;

    private String className;

    //规则索引
    @ApiModelProperty(value = "规则索引")
    private String ruleId;

    private String isClassTeacher;

    private String teacherId;

    @ApiModelProperty(hidden = true)
    private Integer start;
    //获取起始位置
    @ApiModelProperty(hidden = true)
    public Integer getStart(){
        if(pageNum != null&&pageSize != null){
            return (pageNum-1)*pageSize;
        }
        return 0;
    }

    private String tenantId = SysUserUtils.getSysUser().getTenantId();
}
